1. Field of the Invention
This invention relates to a decoding apparatus and, more particularity, to such apparatus for decoding video signals encoded by one of intra-coding, predictive-coding and bidirectionally-predictive coding.
2. Description of the Prior Art
Since the amount of digitized data representing motion pictures is relatively large, such data is typically compressed prior to recording on a recording medium or transmission so as to reduce the amount of data required to be transmitted or recorded, thereby reducing the amount of storage area required on the recording medium. Accordingly, during reception or reproduction, the compressed data is recovered or reproduced from the recording medium and thereafter processed so as to recover the original digitized data. Recording and reproducing as aforedescribed may be performed by a recording and reproducing apparatus, such as that illustrated in FIGS. 9 and 10, respectively.
Video data representing a video picture may be coded by either intra-coding (I-coding), which may include intra-frame coding, intra-field coding and intra-picture coding; predictive-coding (P-coding); or bidirectionally-predictive coding (B-coding) and successive frames usually are represented by all three coding techniques. Accordingly, a video picture formed from data which has been I-coded is hereinafter referred to as an I picture; a video picture formed from data which has been P-coded is referred to as a P picture, and that which has been B-coded is referred to as a B-picture.
An I picture is generated by using only data representing the corresponding frame of that picture. A P picture is generated by using data representing a temporally preceding and previously decoded frame of an I or P picture. In other words, a P picture is generated by using data representing a picture which serves as a reference for determining a difference therebetween, which may be used in deriving a motion vector, as hereinafter more fully described. A B picture is a predictive-type picture which may be generated from any of the following:
1) a temporally preceding and already decoded frame of an I or P picture;
2) a temporally succeeding and already decoded frame of an I or P picture; and
3) a combination of the pictures in groups 1 and 2.
During recording, as shown in FIG. 9, analog video signals from a video camera 1, representing a plurality of video pictures, are supplied to an analog-to-digital (A/D) converter 2, whereupon the analog video signals are converted to digital video signals. The digital video signals from the converter 2 are stored in a frame memory 3, and subsequently are read out therefrom in accordance with a predetermined timing rate and supplied to an input of a subtracting circuit 4. An output signal from the subtracting circuit 4 is supplied to a discrete cosine transform (DCT) circuit 5 which processes the received signal in accordance with a discrete cosine transform so as to obtain DCT coefficient data which are supplied therefrom to a quantizing circuit 6. The quantizing circuit 6 quantizes the received DCT coefficient data and supplies the same to a variable-length coding (VLC) circuit 7, wherein the quantized data is coded into a variable-length code, for example, the Huffman code, and thereafter stored in a video code buffer 8.
The quantized DCT coefficient data from the quantizing circuit 6 is further supplied to an inverse quantizing circuit 10, whereupon inverse quantization processing is performed on data representing video pictures which had been intraframe coded or simply intra-coded (that is, an I picture), or predictive-coded (that is, a P picture). The inverse-quantized DCT coefficient data is supplied to an inverse DCT circuit 11, which performs an inverse discrete cosine transformation on the received data, and supplies an output therefrom to one input of an adding circuit 12. Output picture data from the adding circuit 12 is stored in a frame memory 13.
A motion detecting circuit 14 is coupled to the frame memory 3 and is adapted to detect frame-to-frame motion in the video picture represented by the data stored in the frame memory and to generate a motion vector corresponding to such detected motion. The motion vector is supplied to the VLC circuit 7 for transmission or recording after being encoded, and to a motion compensating circuit 15. The motion compensating circuit 15 further receives the stored picture data from the frame memory 13 and performs motion compensation thereon in accordance with the received motion vector. The motion compensated picture data is supplied to the subtracting circuit 4 so as to be subtracted from the video signal data supplied from the frame memory 3, thereby producing a difference between the frame of picture data that is received and a prediction or estimate of that frame.
The motion compensated picture data from the motion compensating circuit 15 is further supplied to a second input of the adding circuit 12. The adding circuit 12 adds such data to the output data supplied from the inverse DCT circuit 11 so as to generate decoded data representing a decoded I, P or B picture, which is supplied to the frame memory 13 so as to be stored therein as previously described and functions as a prediction of the next-following picture frame.
Thus, the picture data stored in the frame memory 13 is obtained from decoding the same data which is supplied by the quantizing circuit 6 through the VLC circuit 7 to the video code buffer 8. As a result, picture data representing either a P or B picture can be obtained by utilizing the picture data stored in the frame memory 13. An I picture, on the other hand, is generated when only picture data from the frame memory 3 is supplied to the DCT circuit 5. In this situation, motion compensated picture data from the motion compensating circuit 15 is not supplied to the subtracting circuit 4 so that only the present frame of picture data from the frame memory 3 is received by the subtracting circuit which supplies such data therethrough to the DCT circuit 5.
A rate controller 9 monitors the amount of data stored in the video code buffer 8 and, in response thereto, is adapted to supply a signal to the quantizing circuit 6 which adjusts the size of the quantization step utilized by the quantizing circuit. As a result, the bit rate at which data is supplied to the video code buffer 8 for storage thereat varies, thereby preventing an overflow or an underflow of data thereto.
The rate controller 9 further supplies the signal having the quantization step size to the VLC circuit 7. The quantization step size signal along with the motion vector supplied from the motion detecting circuit 14 are processed by the VLC circuit in a manner similar to that previously described and supplied therefrom to the video code buffer 8.
Output data signals from the video code buffer 8 are supplied to a parity adding circuit 30, which is adapted to add error correction parity bits to the received data signals. Such error correction parity bits are utilized for error correction in a manner well known in the art. An output data signal from the parity adding circuit 30 is modulated in accordance with a predetermined type of modulation by a modulating circuit 31. A modulated data signal is supplied from the modulating circuit 31 to a pick up device 32, whereupon the modulated data signal is written onto a recording medium, such as an optical disc 16 or, alternatively, transmitted.
Thus, in the recording apparatus of FIG. 9, video signals from the video camera 1 are compressed by reducing the redundancy between frames of picture data and by utilizing DCT processing and motion vectors, in a relatively highly efficient manner so as to obtain a relatively high compression rate, and then recorded onto the medium 16, as previously described. Accordingly, since video picture data is encoded with such relatively high efficiency, the amount of storage area required on the medium 16 is minimized.
During reproducing (or reception), as shown in FIG. 10, data is read from the medium 16 by a pick-up device 40, or otherwise received, and thereafter demodulated by a demodulating circuit 41. The demodulated data is then error corrected in an error correcting circuit 42 by utilizing the error correction parity bits added in the parity adding circuit 30. The error corrected demodulated data is supplied to a video code buffer 21 for storage thereat.
The data stored in the video code buffer 21 is read out therefrom and supplied to an inverse VLC circuit 22, which performs inverse VLC processing corresponding to the processing performed by the VLC circuit 7 (FIG. 9). Upon completing the inverse VLC processing, the inverse VLC circuit 22 supplies the processed data to an inverse quantizing circuit 23 and further supplies a code request signal to the video code buffer 21 requesting that additional data be read out and supplied to the inverse VLC circuit. The inverse VLC circuit 22 still further supplies a signal representing the quantization step size to the inverse quantizing circuit 23 and a motion vector to a motion compensating circuit 26. The quantization step size and the motion vector supplied from the inverse VLC circuit 22 correspond to those which are respectively produced by the rate controller 9 and the motion detecting circuit 14. Such quantization step size and motion vector had been recorded on the medium 16, as previously described, and subsequently reproduced therefrom along with the picture data.
The inverse quantizing circuit 23 performs inverse quantization processing on the received data in accordance with the quantization step size supplied from the inverse VLC circuit 22. Such inverse quantization corresponds to the quantization processing performed by the quantizing circuit 6 (FIG. 9).
Output data from the inverse quantizing circuit 23 is supplied to an inverse DCT circuit 24 which performs inverse DCT processing corresponding to the processing performed in the DCT circuit 5 (FIG. 9). If the data which has been inverted DCT processed represents an I picture, such data is supplied to a frame memory 27 by way of an adding circuit 25.
If the data which has been inverse DCT processed represents a P picture that had been obtained by utilizing data representing an I picture, data representing the I picture is read out from the frame memory 27 and supplied to the motion compensating circuit 26 so as to be motion compensated in accordance with the motion vector supplied thereto from the inverse VLC circuit 22. Such motion compensated data is supplied to the adding circuit 25 and added thereat to the data from the inverse DCT circuit 24 so to form the data representing the P picture, which then is stored in the frame memory 27.
If the data which has been inverse DCT processed represents a B picture, data representing either an I or a P picture is read out from the frame memory 27 and supplied to the motion compensating circuit 26 so as to be motion compensated in a manner similar to that previously described. Such motion compensated data is supplied to the adding circuit 25 and added thereat to the data from the inverse DCT circuit 24 so as to form the data representing the B picture, which is stored in the frame memory 27.
The data stored in the frame memory 27 is read out therefrom at a predetermined timing rate and supplied to a digital-to-analog (D/A) converting circuit 28, whereupon the data is converted into analog signals. The analog signals are supplied to a display 29 and displayed thereon.
Thus, the data, which had been encoded with relatively high efficiency and recorded onto the record medium 16, is reproduced and decoded so as to enable the same to be displayed on the display 29.
The motion compensation performed on the video data by the recording and reproducing apparatus illustrated in FIGS. 9 and 10, respectively, is more fully explained with reference to FIG. 2. That is, FIG. 2 illustrates a sequence of I, P and B video pictures. The arrows in FIG. 2 indicate the video picture or pictures which are used in forming a respective video picture or frame. For example, the arrow from an Io picture to a Po picture indicates that the Po picture is formed by utilizing a motion vector derived by using the Io picture as a reference video picture. As a further example, the two arrows directed towards a Bo picture indicate that the Bo picture is formed by utilizing a motion vector derived by using either the Io or Po pictures, or both the Io and Po pictures, as a reference video picture(s).
The sequence of video pictures illustrated in FIG. 2, that is, Io, Bo, Po, B1, P1, B2, I1, B3, P2 and so forth, represents the sequence of the video pictures before they are encoded in the recording apparatus of FIG. 9. During encoding this sequence is changed. This changed sequence, which is Io, Po, Bo, P1, B1, I1, B2, P2, B3 and so forth, is the sequence in which the video pictures are recorded on the record medium 16, reproduced therefrom, and supplied to the decoding portion of the reproducing apparatus of FIG. 10. The changed sequence is rearranged by use of the frame memory 27 (FIG. 10) to the sequence illustrated in FIG. 2. Accordingly, the sequence of video pictures supplied to the display 29 from the frame memory 27 has the sequence illustrated in FIG. 2. As is to be appreciated, this change in the sequence is performed so that pictures used as reference pictures in deriving motion vectors are decoded prior to the pictures formed by utilizing such motion vectors.
Suppose that in reading data from the medium 16, an error occurs or is detected by the error correcting circuit 42 which is outside the error correction capability of the error correcting circuit, thereby making the error uncorrectable. Such an uncorrectable error or errors may affect one or more video pictures. That is, an uncorrectable error occurring in data of a B picture only affects the respective B picture, which nevertheless may result in distortion of the displayed data. However, an uncorrectable error occurring in data of either a P or an I picture not only affects the respective P or I picture, but also the pictures which are formed by using motion vectors derived by using the affected respective P or I picture as a reference picture. Thus, in this latter situation, not only will the P or I picture having the uncorrectable error be distorted during the display thereof, but so will the pictures formed by using such I or P picture. For example, if an uncorrectable error occurs in the P1 picture of FIG. 2, this error will affect the P1, B1 and B2 pictures. As another example, if an uncorrectable error occurs in the I1 picture of FIG. 2, the error will affect the B2, B3, P2, B4, P3 and B5, as well as the I1, pictures.
If an uncorrectable error occurs in a digital video tape recorder and reproducer (VTR), which may be used as the recording and reproducing apparatus shown in FIGS. 9 and 10, the portion of an I picture containing the error may be corrected by interpolating the data from an adjacent picture or pictures. However, if the digital VTR is operating in an inter-picture or inter-frame motion prediction mode (that is, a mode wherein the picture being processed, for example, a P or B picture, is formed by using data from at least one other picture), such error correcting technique will normally produce unsatisfactory results (such as unsightly distortions) unless a correct reference picture is obtained and used to reproduce the P or B picture.
Thus, the prior art has failed to provide a decoding apparatus which minimizes picture distortion even if an uncorrectable error exists in picture data that was encoded by using an inter-picture or inter-frame motion prediction technique.